package com.luoxiang.register;

import java.io.IOException;

import org.apache.zookeeper.Watcher;
import org.apache.zookeeper.ZooKeeper;

public class ZookeeperRegister {

	ZooKeeper zooKeeper;
	
	public static final String ROOT = "/luoxiang";

	public ZooKeeper getConnection(Watcher watcher) {
		try {
			zooKeeper = new ZooKeeper("192.168.2.50:2181,192.168.2.51:2181", 6000, watcher);
		} catch (IOException e) {
			e.printStackTrace();
		}
		return zooKeeper;
	}
	
}
